<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <link rel="stylesheet" href="../plugins/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="../plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="../plugins/adminLTE/css/AdminLTE.css">
    <link rel="stylesheet" href="../plugins/adminLTE/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="../css/style.css">
    <script src="../plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="../plugins/bootstrap/js/bootstrap.min.js"></script>
    <script src="../plugins/angularjs/angular.min.js"></script>
    <!-- 分页组件 -->
    <script src="../plugins/angularjs/pagination.js"></script>
    <link rel="stylesheet" href="../plugins/angularjs/pagination.css" >

    <script src="../js/base_pagination.js"></script>
    <script src="../js/service/blogCatService.js"></script>
    <script src="../js/controller/blogCatController.js"></script>
</head>
<body class="hold-transition skin-red sidebar-mini" ng-app="blogCatApp" ng-controller="blogCatController" >
<!-- .box-body -->
<div class="box-header with-border">
    <h3 class="box-title">博客列表</h3>
</div>

<div class="box-body">


    <!-- 数据表格 -->
    <div class="table-box">

        <!--工具栏-->
        <div class="pull-left">
            <div class="form-group form-inline">
                <div class="btn-group">
                    <button type="button" class="btn btn-default" title="新建" data-toggle="modal" data-target="#addModal" ng-click="entity={}"><i class="fa fa-file-o"></i> 新建</button>
                    <button type="button" class="btn btn-default" title="删除" data-toggle="modal" data-target="#delModal"><i class="fa fa-trash-o"></i> 删除</button>
                    <button type="button" class="btn btn-default" title="刷新" onclick="window.location.reload();"><i class="fa fa-refresh"></i> 刷新</button>
                </div>
            </div>
        </div>
        <div class="box-tools pull-right">
            <div class="has-feedback">

            </div>
        </div>
        <!--工具栏/-->

        <!--数据列表-->



        <table id="dataList" class="table table-bordered table-striped table-hover dataTable">
            <thead>
            <tr>
                <th class="" style="padding-right:0px">
                    <input id="selall" type="checkbox" class="icheckbox_square-blue">
                </th>
                <th class="sorting_asc hidden-xs">ID</th>
                <th class="sorting">类别名称</th>
                <th class="sorting hidden-xs">创建时间</th>
                <th class="sorting hidden-xs">更新时间</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            <!-- ngRepeat: entity in list --><tr >
                <td><input type="checkbox" ng-click="updateSelection($event,entity.id)"></td>
                <td class="hidden-xs ng-binding" style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap">155930775142804</td>
                <td style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap" class="ng-binding">算法与数据结构</td>
                <td class="hidden-xs ng-binding">2019-05-31 09:02:31</td>
                <td class="hidden-xs ng-binding">2019-05-31 09:02:31</td>
                <td class="text-center">
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#editModal" ng-click="findOne(entity.id)">修改</button>
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#descModal" ng-click="findOne(entity.id)">详情</button>
                </td>
            </tr><!-- end ngRepeat: entity in list --><tr >
                <td><input type="checkbox" ng-click="updateSelection($event,entity.id)"></td>
                <td class="hidden-xs ng-binding" style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap">155936295103334</td>
                <td style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap" class="ng-binding">Linux</td>
                <td class="hidden-xs ng-binding">2019-06-01 12:22:31</td>
                <td class="hidden-xs ng-binding">2019-06-01 12:22:31</td>
                <td class="text-center">
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#editModal" ng-click="findOne(entity.id)">修改</button>
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#descModal" ng-click="findOne(entity.id)">详情</button>
                </td>
            </tr><!-- end ngRepeat: entity in list --><tr >
                <td><input type="checkbox" ng-click="updateSelection($event,entity.id)"></td>
                <td class="hidden-xs ng-binding" style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap">155936296029862</td>
                <td style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap" class="ng-binding">推理</td>
                <td class="hidden-xs ng-binding">2019-06-01 12:22:40</td>
                <td class="hidden-xs ng-binding">2019-06-01 12:22:40</td>
                <td class="text-center">
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#editModal" ng-click="findOne(entity.id)">修改</button>
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#descModal" ng-click="findOne(entity.id)">详情</button>
                </td>
            </tr><!-- end ngRepeat: entity in list --><tr >
                <td><input type="checkbox" ng-click="updateSelection($event,entity.id)"></td>
                <td class="hidden-xs ng-binding" style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap">155936296812409</td>
                <td style="max-width: 100px;overflow: hidden; text-overflow:ellipsis;white-space: nowrap" class="ng-binding">JAVA</td>
                <td class="hidden-xs ng-binding">2019-06-01 12:22:48</td>
                <td class="hidden-xs ng-binding">2019-06-01 12:22:48</td>
                <td class="text-center">
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#editModal" ng-click="findOne(entity.id)">修改</button>
                    <button type="button" class="btn bg-olive btn-xs" data-toggle="modal" data-target="#descModal" ng-click="findOne(entity.id)">详情</button>
                </td>
            </tr><!-- end ngRepeat: entity in list -->

            </tbody>
        </table>
        <!--数据列表/-->
        <!-- 分页 -->
        <tm-pagination conf="paginationConf"></tm-pagination>



    </div>
    <!-- 数据表格 /-->


</div>
<!-- /.box-body -->
<!-- 编辑窗口 -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="top:auto;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel">类别添加</h3>
            </div>
            <div class="modal-body" >
                <table class="table table-bordered table-striped"  width="auto">
                    <!--<input type="hidden" name="createTime" ng-model="emtity.createTime" />-->
                    <tr>
                        <td>类别名称</td>
                        <td><input  class="form-control" placeholder="类别名称" ng-model="entity.name" >  </td>
                    </tr>

                </table>
            </div>
            <div class="modal-footer">
                <button class="btn btn-success" data-dismiss="modal" aria-hidden="true" ng-click="add()">保存</button>
                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>

<!--详细-->
<div class="modal fade" id="descModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="top:auto;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 >{{entity.title}}</h3>
            </div>
            <div class="modal-body"  >
                <table class="table table-bordered table-striped"  width="auto">
                    <!--<input type="hidden" name="createTime" ng-model="emtity.createTime" />-->
                    <tr>
                        <td>类别名称</td>
                        <td>{{entity.name}}</td>
                    </tr>
                    <tr>
                        <td>创建时间</td>
                        <td>{{entity.createTime | date: "yyyy-MM-dd hh:mm:ss"}}</td>
                    </tr>
                    <tr>
                        <td>修改时间</td>
                        <td>{{entity.updateTime | date: "yyyy-MM-dd hh:mm:ss"}}</td>
                    </tr>
                </table>
            </div>
            <div class="modal-footer">

                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="delModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="top:auto">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 >提示</h3>
            </div>
            <div class="modal-body"  >
                你真的要删除吗？
            </div>
            <div class="modal-footer">
                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true" ng-click="dele()">确定</button>
                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            </div>
        </div>
    </div>
</div>
</html>